//allgoods.js
const app = getApp();
let ids = '0';
Page({
  data: {
     current: '0',
     id:'0'
  },
  onLoad: function (options) {
    if (options.names != undefined) {
       wx.setNavigationBarTitle({
          title: options.names
       })
    }
  },
  onReachBottom:function(){
    let that = this;
    
  },
  menulist:function(e){
    var that = this;
    var num = e.currentTarget.dataset.num;
    that.setData({
        current: num,
        id:'0'
     },()=>{
        ids = '0';
    })
  },
  priceOrder: function(){
    var that = this;
    if (ids == '0'){
      that.setData({
        id: '1'
      }, () => {
          ids = '1';
      })
    }else if(ids== '1'){
      that.setData({
        id: '2'
      }, () => {
          ids = '0';
      })
    }
  },
   goodsDetails: function () {
     wx.navigateTo({
       url: '/pages/goodsdetails/goodsdetails'
     })
  }
})
